package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the TM_DEPARTAMENTO database table.
 * 
 */
@Embeddable
public class TmDepartamentoPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;
	private String dptoId;
	private String paisId;

    public TmDepartamentoPK() {
    }

	@Column(name="DPTO_ID", unique=true, nullable=false, length=2)
	public String getDptoId() {
		return this.dptoId;
	}
	public void setDptoId(String dptoId) {
		this.dptoId = dptoId;
	}

	@Column(name="PAIS_ID", unique=true, nullable=false, length=2)
	public String getPaisId() {
		return this.paisId;
	}
	public void setPaisId(String paisId) {
		this.paisId = paisId;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof TmDepartamentoPK)) {
			return false;
		}
		TmDepartamentoPK castOther = (TmDepartamentoPK)other;
		return 
			this.dptoId.equals(castOther.dptoId)
			&& this.paisId.equals(castOther.paisId);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.dptoId.hashCode();
		hash = hash * prime + this.paisId.hashCode();
		
		return hash;
    }
}